<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Account/classes/PhpFox_ComponentInviteList.class.php, $Author:  $ */



/** Invites list component
 * 
 * @package module.account
 * @version $Id: PhpFox_ComponentInviteList.class.php 46 2007-12-14 23:12:21Z phpfoxsv $
 *   
 */
class PhpFox_Mod_Account_ComponentInviteList extends BaseComponent
{

    /** Processing method
     */
	function process()
	{
	    
	    $oReq = &App::getRequest();
	    /* @var $oReq Request */
	    
        $oSrvInvite = &$this->_oModule->getService('Invite');
        /* @var $oSrvInvite PhpFox_Mod_Account_ServiceInvite */
	    
		$iPage = $oReq->getInt('page', 1);
    	$iPageSize = App::getParam('admin.pagesize');
	    list($aInvites, $iTotal) = $oSrvInvite->getList(array(), $iPage, $iPageSize, 'ID desc');
	    $oPager = App::newObject('Pager', $iTotal, $iPage, $iPageSize);        
	    
 
		$oTpl = &$this->_oModule->getTemplate();
		$oTpl->assignSrc(array(
			'aInvites' => $aInvites,
			'aPaging'  => $oPager->getInfo(App::getUrl()),
		));
		$srcHtml = $oTpl->fetch('InviteList.html');
		return $srcHtml;
	}
	

}
?>